package com.ydgk.service.impl;

import com.ydgk.bean.Admin;
import com.ydgk.dao.AdminMapper;
import com.ydgk.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private AdminMapper adminMapper;

    public Boolean checkExsit(Admin admin) {
        int i = adminMapper.findCountByAname(admin);
        if(i > 0){
            return true;
        }else {
            return false;
        }
    }

    public Admin checkRight(Admin admin) {
        return adminMapper.checkRight(admin);
    }
}
